const GetUrlImg = {
  get: function (url,filename) {
    return new Promise((resolve,reject) => {
      var blob = null;
      var xhr = new XMLHttpRequest();
      xhr.open('GET',url);
      xhr.setRequestHeader("Accept",'image/png');
      xhr.responseType = 'blob';
      xhr.onload = () => {
        blob = xhr.response;
        let imgFile = new File([blob],filename,{ Type: 'image/png'})
        resolve(imgFile);
      }
      xhr.onerror = (e) => {
        reject(e)
      }
      xhr.send();
    })
  }
}
export default GetUrlImg